package com;


import com.kangye.exam.filter.UserInterceptor;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

import java.util.Stack;

//拦截器配置
//@Configuration
public class InterceptorConfig implements WebMvcConfigurer {

    String[] addPathPatterns={"/*"}; //拦截路径
    String[] excludePathPatterns={}; //排除选项
    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(new UserInterceptor()).addPathPatterns(addPathPatterns);
    }
}
